<!Doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>7.1.2 Android Http请求头与响应头的学习 | 菜鸟教程</title>

  <meta name='robots' content='max-image-preview:large' />
<link rel='stylesheet' id='classic-theme-styles-css' href='../0/classic-themes.min.css?ver=6.2' type='text/css' media='all' />
<link rel="canonical" href="../w3cnote/android-tutorial-http-response-header.html" />
<meta name="keywords" content="7.1.2 Android Http请求头与响应头的学习">
<meta name="description" content="本节引言：  上节中我们对Android涉及的网络编程进行了了解，也学习了下Http的基本概念，而本节我们 要学习的是Http的请求头与响应头，当然，可以把也可以把这节看作文档，用到的时候来查查 即可！    1.HTTP请求之消息头:  这里贴下上一节给出的图,根据下面给出的表，大家自己感受下相关请求头的作用吧: PS:第一行是请求行:请求方式 + 资源名称 + HTTP协议版本号，另外请求头只是给服务端的一个 信息而已或者说一个简单..">
		
	<link rel="shortcut icon" href="https://static.runoob.com/images/favicon.ico">
	<link rel="stylesheet" href="../0/style.css?v=1.170" type="text/css" media="all" />	
	<link rel="stylesheet" href="../0/font-awesome.min.css" media="all" />	
  <!--[if gte IE 9]><!-->
  <script src=""></script>
  <!--<![endif]-->
  <!--[if lt IE 9]>
     <script src=""></script>
     <script src=""></script>
  <![endif]-->
  <link rel="apple-touch-icon" href="https://static.runoob.com/images/icon/mobile-icon.png"/>
  <meta name="apple-mobile-web-app-title" content="菜鸟教程">
</head>
<body>

<!--  头部 -->
<div class="container logo-search">

  <div class="col search row-search-mobile">
    <form action="index.php">
      <input class="placeholder" placeholder="搜索……" name="s" autocomplete="off">
      
    </form>
  </div>

  <div class="row">
    <div class="col logo">
      <h1><a href="../">菜鸟教程 -- 学的不仅是技术，更是梦想！</a></h1>
    </div>
        <div class="col right-list"> 
    <button class="btn btn-responsive-nav btn-inverse" data-toggle="collapse" data-target=".nav-main-collapse" id="pull" style=""> <i class="fa fa-navicon"></i> </button>
    </div>
        
    <div class="col search search-desktop last">
      <div class="search-input" >
      <form action="//www.runoob.com/" target="_blank">
        <input class="placeholder" id="s" name="s" placeholder="搜索……"  autocomplete="off" style="height: 44px;">
      </form>
      
      </div>
    </div>
  </div>
</div>



<!-- 导航栏 -->
<div class="container navigation">
    <div class="row">
        <div class="col nav">
            

                        <ul class="pc-nav" id="note-nav">
                <li><a href="../">首页</a></li>
                <li><a href="../w3cnote">笔记首页</a></li>
                <li><a href="../w3cnote/android-tutorial-intro.html" title="Android 基础入门教程">Android</a></li>
                <li><a href="../w3cnote/es6-tutorial.html" title="ES6 教程">ES6 教程</a></li>
                <li><a href="../w3cnote/ten-sorting-algorithm.html" title="排序算法">排序算法</a></li>
                <li><a href="../w3cnote/hadoop-tutorial.html" title="Hadoop 教程">Hadoop</a></li>
                <li><a href="../w3cnote/zookeeper-tutorial.html" title="Zookeeper 教程">Zookeeper</a></li>
                <li><a href="../w3cnote/verilog-tutorial.html" title="Verilog 教程">Verilog</a></li>
                <li><a href="../w3cnote_genre/code" title="编程技术">编程技术</a></li> 
                <li><a href="../w3cnote_genre/coderlife" title="程序员人生">程序员人生</a></li>
                
                <!--<li><a href="javascript:;" class="runoob-pop">登录</a></li>
                
                
                        <li>
                <a style="font-weight:bold;" href="../linux/linux-tutorial.html#yunserver" target="_blank" onclick="_hmt.push(['_trackEvent', 'aliyun', 'click', 'aliyun'])" title="kkb">云服务器</a>
                </li>
                <li><a href="http://gk.link/a/104mQ" target="_blank" style="font-weight: bold;"onclick="_hmt.push(['_trackEvent', '极客时间', 'click', 'jike'])" title="我的圈子">极客时间</a></li>
            
                
                <li><a target="_blank" href="../shoppinglist" rel="nofollow">知识店铺</a></li> 
        -->
            </ul>
                        
              
            <ul class="mobile-nav">
                <li><a href="../w3cnote">首页</a></li>
                <li><a href="../w3cnote_genre/android" target="_blank" title="Android 基础入门教程">Android</a></li>
                <li><a href="../w3cnote/es6-tutorial.html" target="_blank" title="ES6 教程">ES6</a></li>
                <li><a href="../w3cnote_genre/joke" target="_blank" title="程序员笑话">逗乐</a></li>
                
                <a href="javascript:void(0)" class="search-reveal">Search</a> 
            </ul>
            
        </div>
    </div>
</div>


<!--  内容  -->
<div class="container main">
	<div class="row">

		<!--  Android 基础入门教程 start  -->
	<div class="col left-column" style="display:none;">
		<div class="tab">Android 基础入门教程</div>
		<div class="sidebar-box gallery-list">
			<div class="design" id="leftcolumn">  
			</div> 
		</div> 
	</div>
	<!--  Android 基础入门教程 end  -->
		<div class="col middle-column big-middle-column">
	 			<div class="article">
			<div class="article-heading">
				<h2>7.1.2 Android Http请求头与响应头的学习</h2>				<h3><em>分类</em> <a href="../w3cnote_genre/android" title="Android 基础入门教程" >Android 基础入门教程</a> </h3>
			</div>
			<div class="article-body note-body">
				<div class="article-intro">
					<h2>本节引言：</h2>

<blockquote><p>上节中我们对Android涉及的网络编程进行了了解，也学习了下Http的基本概念，而本节我们
要学习的是Http的请求头与响应头，当然，可以把也可以把这节看作文档，用到的时候来查查
即可！</p></blockquote>

<hr />

<h2>1.HTTP请求之消息头:</h2>

<blockquote><p>这里贴下上一节给出的图,根据下面给出的表，大家自己感受下相关请求头的作用吧:
PS:第一行是请求行:请求方式 + 资源名称 + HTTP协议版本号，另外请求头只是给服务端的一个
信息而已或者说一个简单，至于怎么处理，还是由服务端来决定的！</p>

<p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/55925666.jpg" alt="" /></p></blockquote>

<hr />

<h3>HTTP Request Header请求头信息对照表:</h3>

<table class="reference">
<thead>
<tr>
<th align="left">Header</th>
<th align="left">解释</th>
<th align="left">示例</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><strong>Accept</strong></td>
<td align="left">指定客户端能够接收的内容类型</td>
<td align="left">Accept: text/plain, text/html</td>
</tr>
<tr>
<td align="left"><strong>Accept-Charset</strong></td>
<td align="left">浏览器可以接受的字符编码集。</td>
<td align="left">Accept-Charset: iso-8859-5</td>
</tr>
<tr>
<td align="left"><strong>Accept-Encoding</strong></td>
<td align="left">指定浏览器可以支持的web服务器返回内容压缩编码类型。</td>
<td align="left">Accept-Encoding: compress, gzip</td>
</tr>
<tr>
<td align="left"><strong>Accept-Language</strong></td>
<td align="left">浏览器可接受的语言</td>
<td align="left">Accept-Language: en,zh</td>
</tr>
<tr>
<td align="left"><strong>Accept-Ranges</strong></td>
<td align="left">可以请求网页实体的一个或者多个子范围字段</td>
<td align="left">Accept-Ranges: bytes</td>
</tr>
<tr>
<td align="left"><strong>Authorization</strong></td>
<td align="left">HTTP授权的授权证书</td>
<td align="left">Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==</td>
</tr>
<tr>
<td align="left"><strong>Cache-Control</strong></td>
<td align="left">指定请求和响应遵循的缓存机制</td>
<td align="left">Cache-Control: no-cache</td>
</tr>
<tr>
<td align="left"><strong>Connection</strong></td>
<td align="left">表示是否需要持久连接。（HTTP 1.1默认进行持久连接）</td>
<td align="left">Connection: close</td>
</tr>
<tr>
<td align="left"><strong>Cookie</strong></td>
<td align="left">HTTP请求发送时，会把保存在该请求域名下的所有cookie值一起发送给web服务器。</td>
<td align="left">Cookie: $Version=1; Skin=new;</td>
</tr>
<tr>
<td align="left"><strong>Content-Length</strong></td>
<td align="left">请求的内容长度</td>
<td align="left">Content-Length: 348</td>
</tr>
<tr>
<td align="left"><strong>Content-Type</strong></td>
<td align="left">请求的与实体对应的MIME信息</td>
<td align="left">Content-Type: application/x-www-form-urlencoded</td>
</tr>
<tr>
<td align="left"><strong>Date</strong></td>
<td align="left">请求发送的日期和时间</td>
<td align="left">Date: Tue, 15 Nov 2010 08:12:31 GMT</td>
</tr>
<tr>
<td align="left"><strong>Expect</strong></td>
<td align="left">请求的特定的服务器行为</td>
<td align="left">Expect: 100-continue</td>
</tr>
<tr>
<td align="left"><strong>From</strong></td>
<td align="left">发出请求的用户的Email</td>
<td align="left">From: user@email.com</td>
</tr>
<tr>
<td align="left"><strong>Host</strong></td>
<td align="left">  指定请求的服务器的域名和端口号</td>
<td align="left">  Host: www.zcmhi.com</td>
</tr>
<tr>
<td align="left"><strong>If-Match</strong></td>
<td align="left">  只有请求内容与实体相匹配才有效</td>
<td align="left">  If-Match: "737060cd8c284d8af7ad3082f209582d"</td>
</tr>
<tr>
<td align="left"><strong>If-Modified-Since</strong></td>
<td align="left"> 如果请求的部分在指定时间之后被修改则请求成功，未被修改则返回304代码</td>
<td align="left">    If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT</td>
</tr>
<tr>
<td align="left"><strong>If-None-Match</strong>  </td>
<td align="left">如果内容未改变返回304代码，参数为服务器先前发送的Etag，与服务器回应的Etag比较判断是否改变   </td>
<td align="left">If-None-Match: "737060cd8c284d8af7ad3082f209582d"</td>
</tr>
<tr>
<td align="left"><strong>If-Range</strong></td>
<td align="left">  如果实体未改变，服务器发送客户端丢失的部分，否则发送整个实体。参数也为Etag</td>
<td align="left">  If-Range: "737060cd8c284d8af7ad3082f209582d"</td>
</tr>
<tr>
<td align="left"><strong>If-Unmodified-Since</strong>    </td>
<td align="left">只在实体在指定时间之后未被修改才请求成功   </td>
<td align="left">If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT</td>
</tr>
<tr>
<td align="left"><strong>Max-Forwards</strong>   </td>
<td align="left">限制信息通过代理和网关传送的时间</td>
<td align="left">  Max-Forwards: 10</td>
</tr>
<tr>
<td align="left"><strong>Pragma</strong> </td>
<td align="left">用来包含实现特定的指令  </td>
<td align="left">Pragma: no-cache</td>
</tr>
<tr>
<td align="left"><strong>Proxy-Authorization</strong></td>
<td align="left">   连接到代理的授权证书</td>
<td align="left"> Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==</td>
</tr>
<tr>
<td align="left"><strong>Range</strong></td>
<td align="left"> 只请求实体的一部分，指定范围</td>
<td align="left"> Range: bytes=500-999</td>
</tr>
<tr>
<td align="left"><strong>Referer</strong></td>
<td align="left">   先前网页的地址，当前请求网页紧随其后,即来路    </td>
<td align="left">Referer: http://blog.csdn.net/coder_pig</td>
</tr>
<tr>
<td align="left"><strong>TE</strong> </td>
<td align="left">客户端愿意接受的传输编码，并通知服务器接受接受尾加头信息   </td>
<td align="left">TE: trailers,deflate;q=0.5</td>
</tr>
<tr>
<td align="left"><strong>Upgrade</strong></td>
<td align="left">   向服务器指定某种传输协议以便服务器进行转换（如果支持）</td>
<td align="left">  Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11</td>
</tr>
<tr>
<td align="left"><strong>User-Agent</strong></td>
<td align="left">    User-Agent的内容包含发出请求的用户信息</td>
<td align="left">   User-Agent: Mozilla/5.0 (Linux; X11)</td>
</tr>
<tr>
<td align="left"><strong>Via</strong></td>
<td align="left">   通知中间网关或代理服务器地址，通信协议</td>
<td align="left">  Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)</td>
</tr>
<tr>
<td align="left"><strong>Warning</strong>    </td>
<td align="left">关于消息实体的警告信息  </td>
<td align="left">Warn: 199 Miscellaneous warning</td>
</tr>
</tbody>
</table>


<h2>2.HTTP响应之响应头:</h2>

<blockquote><p>同样给出上节的图:
PS:第一行依次是:协议版本号 状态码 302表示这里没有，但是另外一个地方有，通过Location页面重定向了</p>

<p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/51069068.jpg" alt="" /></p></blockquote>

<h3>HTTP Responses Header 响应头信息对照表：</h3>

<table class="reference">
<thead>
<tr>
<th align="left">Header</th>
<th align="left">解释</th>
<th align="left">示例</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><strong>Accept-Ranges</strong></td>
<td align="left"> 表明服务器是否支持指定范围请求及哪种类型的分段请求</td>
<td align="left">    Accept-Ranges: bytes</td>
</tr>
<tr>
<td align="left"><strong>Age</strong></td>
<td align="left">   从原始服务器到代理缓存形成的估算时间（以秒计，非负）</td>
<td align="left"> Age: 12</td>
</tr>
<tr>
<td align="left"><strong>Allow</strong></td>
<td align="left"> 对某网络资源的有效的请求行为，不允许则返回405</td>
<td align="left"> Allow: GET, HEAD</td>
</tr>
<tr>
<td align="left"><strong>Cache-Control</strong></td>
<td align="left"> 告诉所有的缓存机制是否可以缓存及哪种类型</td>
<td align="left">   Cache-Control: no-cache</td>
</tr>
<tr>
<td align="left"><strong>Content-Encoding</strong></td>
<td align="left">  web服务器支持的返回内容压缩编码类型</td>
<td align="left">    Content-Encoding: gzip</td>
</tr>
<tr>
<td align="left"><strong>Content-Language</strong></td>
<td align="left">  响应体的语言</td>
<td align="left"> Content-Language: en,zh</td>
</tr>
<tr>
<td align="left"><strong>Content-Length</strong></td>
<td align="left">    响应体的长度</td>
<td align="left"> Content-Length: 348</td>
</tr>
<tr>
<td align="left"><strong>Content-Location</strong></td>
<td align="left">  请求资源可替代的备用的另一地址</td>
<td align="left">  Content-Location: /index.htm</td>
</tr>
<tr>
<td align="left"><strong>Content-MD5</strong></td>
<td align="left">   返回资源的MD5校验值 </td>
<td align="left">Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==</td>
</tr>
<tr>
<td align="left"><strong>Content-Range</strong></td>
<td align="left"> 在整个返回体中本部分的字节位置</td>
<td align="left">  Content-Range: bytes 21010-47021/47022</td>
</tr>
<tr>
<td align="left"><strong>Content-Type</strong></td>
<td align="left">  返回内容的MIME类型</td>
<td align="left">  Content-Type: text/html; charset=utf-8</td>
</tr>
<tr>
<td align="left"><strong>Date</strong></td>
<td align="left">  原始服务器消息发出的时间</td>
<td align="left">   Date: Tue, 15 Nov 2010 08:12:31 GMT</td>
</tr>
<tr>
<td align="left"><strong>ETag</strong></td>
<td align="left">  请求变量的实体标签的当前值</td>
<td align="left">    ETag: "737060cd8c284d8af7ad3082f209582d"</td>
</tr>
<tr>
<td align="left"><strong>Expires</strong></td>
<td align="left">   响应过期的日期和时间</td>
<td align="left"> Expires: Thu, 01 Dec 2010 16:00:00 GMT</td>
</tr>
<tr>
<td align="left"><strong>Last-Modified</strong></td>
<td align="left"> 请求资源的最后修改时间</td>
<td align="left">  Last-Modified: Tue, 15 Nov 2010 12:45:26 GMT</td>
</tr>
<tr>
<td align="left"><strong>Location</strong></td>
<td align="left">  用来重定向接收方到非请求URL的位置来完成请求或标识新的资源</td>
<td align="left">   Location: http://blog.csdn.net/coder_pig</td>
</tr>
<tr>
<td align="left"><strong>Pragma</strong></td>
<td align="left">    包括实现特定的指令，它可应用到响应链上的任何接收方</td>
<td align="left">    Pragma: no-cache</td>
</tr>
<tr>
<td align="left"><strong>Proxy-Authenticate</strong></td>
<td align="left">    它指出认证方案和可应用到代理的该URL上的参数</td>
<td align="left">    Proxy-Authenticate: Basic</td>
</tr>
</tbody>
</table>


<hr />

<h2>3.代码验证响应头的作用：</h2>

<blockquote><p>好了，看了那么多概念的东西，不动动手怎么行呢？是吧，那我们就写一些简单的代码来验证一些
常用的响应头的作用吧，以便加深我们的了解，这里的话服务端就用最简单的Servlet来实现，如果不会
Java Web的朋友只需将代码拷一拷，配置下web.xml，把Servlet的类名扣上，比如:</p></blockquote>
<pre>
&lt;servlet&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;servlet-name&gt;FirstServlet&lt;/servlet-name&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;servlet-class&gt;com.jay.server.FirstServlet&lt;/servlet-class&gt;
&lt;/servlet&gt;
&lt;servlet-mapping&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;servlet-name&gt;FirstServlet&lt;/servlet-name&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;url-pattern&gt;/FirstServlet&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
</pre>
<p>
改成对应的类名即可！</p>

<hr />

<h3>1）通过Location实现页面重定向</h3>

<p><strong>实现代码</strong>：</p>

<pre>
package com.jay.http.test;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletOne extends HttpServlet {
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doGet(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//告诉浏览器响应码，以及重定向页面
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setStatus(302);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("Location", "http://www.baidu.com");
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doPost(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.doGet(req, resp);
&nbsp;&nbsp;&nbsp;&nbsp;}
}
</pre><p><b>
运行结果</b>：</p><p>
当我们去访问:http://localhost:8080/HttpTest/ServletOne的时候，我们会发现页面跳转到了百度,
接着我们用FireFox的开发者工具:可以看到我们发出的HTTP的内容:</p>

<img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/51774741.jpg">


<hr><h3> 2）通过Content-Encoding告诉浏览器数据的压缩格式</h3><p><b>
实现代码:</b></p>
<pre>
package com.jay.http.test;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.GZIPOutputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletTwo extends HttpServlet {
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doGet(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String data = "Fresh air and sunshine can have an amazing effect on our feelings. "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "Sometimes when we are feeling down, all that we need to do is simply to go "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "outside and breathe. Movement and exercise is also a fantastic way to feel better. "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "Positive emotions can be generated by motion. So if we start to feel down,"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ " take some deep breathes, go outside, feel the fresh air, "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "let the sun hit our face, go for a hike, a walk, a bike ride, "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "a swim, a run, whatever. We will feel better if we do this.";
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("原始数据长度:" + data.getBytes().length);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// 对数据进行压缩:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ByteArrayOutputStream bout = new ByteArrayOutputStream();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GZIPOutputStream gout = new GZIPOutputStream(bout);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gout.write(data.getBytes());
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gout.close();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// 得到压缩后的数据
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte gdata[] = bout.toByteArray();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("Content-Encoding", "gzip");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("Content-Length", gdata.length + "");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.getOutputStream().write(gdata);

&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;protected void doPost(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doGet(req, resp);
&nbsp;&nbsp;&nbsp;&nbsp;};
}
</pre>

<p><strong>运行结果</strong>：</p>

<p>控制台输出:</p><p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/66762031.jpg" alt="" /></p><p>
浏览器输出:</p><p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/40406534.jpg" alt="" /></p><p>
再看看我们的HTTP内容:</p><p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/2759200.jpg" alt="" /></p><p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/61401927.jpg" alt="" /></p><p>
这个<strong>gzip</strong>压缩字符串对于简单的字符串压缩，效率不高，比如小猪本来写的是一个一首静夜诗的字符串，
后来发现压缩过后的大小，竟然比原先的还要大=-=...</p>

<hr />

<h3>3）通过content-type，设置返回的数据类型</h3>

<blockquote><p>服务端返回的有时可能是一个text/html，有时也可能是一个image/jpeg，又或者是一段视频video/avi
浏览器可以根据这个对应的数据类型，然后以不同的方式将数据显示出来！好吧，这里我们弄一个读PDF的</p></blockquote>

<p><strong>实现代码</strong>：
</p>
<pre>
package com.jay.http.test;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletThree extends HttpServlet {
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doGet(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("content-type", "application/pdf");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputStream in = this.getServletContext().getResourceAsStream("/file/android编码规范.pdf");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte buffer[] = new byte[1024];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int len = 0;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream out = resp.getOutputStream();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while((len = in.read(buffer)) &gt; 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.write(buffer,0,len);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws
&nbsp;&nbsp;&nbsp;&nbsp;   ServletException ,IOException 
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doGet(req, resp);
&nbsp;&nbsp;&nbsp;&nbsp;};
}
</pre><p><b>

运行结果：</b></p>

<p>在浏览器上输入:http://localhost:8080/HttpTest/ServletThree</p><p>
好哒，果然可以读到PDF了,对了，这个PDF我已经丢在webroot的file目录下，不然会报空指针哦~:</p><p>
当然，你也可以试着去播放一段音乐或者视频，只需修改下content-type这个参数而已</p><p>
下面顺便给出个HTTP Content-type的对照表吧: <a target="_blank" href="../http/http-content-type.html">HTTP Content-type的对照表</a></p>

<img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/57577738.jpg">
<hr><h3> 4）通过refresh响应头，让浏览器隔几秒后跳转至别的页面</h3><p>

恩呢，一般我们可能有这样的需求，比如每隔几秒刷新一次页面，又或者加载某个页面几秒后
又跳转至另一个页面，那么refresh可以满足你的需要~</p>


<p><b>实现代码：</b></p>

<pre>
package com.jay.http.test;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletFour extends HttpServlet {
&nbsp;&nbsp;&nbsp;&nbsp;public int second = 0;
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doGet(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//1.浏览器每隔2秒定时刷新页面
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("refresh", "2");
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.getWriter().write(++second + "");
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("doGet方法被调用~");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//2.进入页面5s后，然页跳到百度~
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("refresh", "5;url='http://www.baidu.com'");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.getWriter().write("HE HE DA~");
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException ,IOException 
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doGet(req, resp);
&nbsp;&nbsp;&nbsp;&nbsp;};
}
</pre>

<p><strong>运行结果</strong>：</p>

<blockquote><ul>
<li>1的话每隔2秒刷新一次页面，我们可以看到显示的数字是递增的，另外doGet方法也一直被调用，
说明页面真的是刷新的！</li>
<li>2的话进入页面后5s，就自己跳转到百度了~</li>
</ul>
</blockquote>

<hr />

<h3>5）通过content-dispostion响应头，让浏览器下载文件</h3>

<blockquote><p>这个很简单，我们只需把③中设置Content-type的一行去掉，然后加上：<b>
resp.setHeader("content-disposition", "attachment;filename=Android.pdf");</b></p></blockquote>

<p><strong>实现代码</strong>：
</p>
<pre>
package com.jay.http.test;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ServletFive extends HttpServlet {
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doGet(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp.setHeader("content-disposition", "attachment;filename=Android.pdf");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputStream in = this.getServletContext().getResourceAsStream("/file/android编码规范.pdf");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte buffer[] = new byte[1024];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int len = 0;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream out = resp.getOutputStream();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while((len = in.read(buffer)) &gt; 0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.write(buffer,0,len);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;@Override
&nbsp;&nbsp;&nbsp;&nbsp;protected void doPost(HttpServletRequest req, HttpServletResponse resp)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws ServletException, IOException {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doGet(req, resp);
&nbsp;&nbsp;&nbsp;&nbsp;}
}
</pre>
<p><strong>运行结果</strong>：</p>

<p><img decoding="async" src="//www.runoob.com/wp-content/uploads/2015/09/27382933.jpg" alt="" /></p>

<hr />

<h2>本节小结：</h2>

<blockquote><p>本节给大家介绍了Http中的请求头和响应头，也写了几个关于响应头调浏览器的一些示例，
相信经过本章，大家对于Http协议更加了解了，下节我们来学习Android给我们提供的Http
请求方式:HttpURLConnection！好的，本节就到这里，谢谢~
对了，本节demo下载：<a href="../try/download/HttpTest.zip">下载 HttpTest.zip</a></p></blockquote>				</div>
			</div>
			<div class="previous-next-links">
			<div class="previous-design-link">← <a href="../w3cnote/android-tutorial-http.html" rel="prev"> 7.1.1 Android网络编程要学的东西与Http协议学习</a> </div>
			<div class="next-design-link"><a href="../w3cnote/android-tutorial-httpurlconnection.html" rel="next"> 7.1.3 Android HTTP请求方式:HttpURLConnection</a> →</div>
			</div>
						<div class="article-heading-ad" id="w3cnote-ad728">
			<script async src=""></script>
			<!-- 移动版 自动调整 -->
			<ins class="adsbygoogle"
			     style="display:inline-block;min-width:300px;max-width:970px;width:100%;height:90px"
			     data-ad-client="ca-pub-5751451760833794"
			     data-ad-slot="1691338467"
			     data-ad-format="horizontal"></ins>
			<script>
			(adsbygoogle = window.adsbygoogle || []).push({});
			</script>
			</div>
			<style>
@media screen and (max-width: 768px) {
	#w3cnote-ad728 {
		display: none;
	}
}
p.note-author {
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: bold;
    color: #78a15a;
    padding-bottom: 2px;
    margin-bottom: 4px;
}
</style>
<script>
var aid = 13607;
</script>
	</div>
		
	</div>
	<div class="listcol last right-column">

	<script type="text/javascript">
jQuery(document).ready(function ($){
	var total = $(".membership li").length;
	var left_list = '';
	href = window.location.href;
	
	$(".membership li").each(function(index, value){

		left_list += $(this).html();

		cur_href = $(this).find("a").attr("href");
		cur_obj = $(this);
		
		if(href.match(cur_href) != null) {
			if(index==0) {
				$(".previous-design-link").hide();
			}
			if(index==(total-1)) {
				$(".next-design-link").hide();
			}
			prev_href = cur_obj.prev("li").find("a").attr("href");
			prev_title = cur_obj.prev("li").find("a").attr("title");

			next_href = cur_obj.next("li").find("a").attr("href");
			next_title = cur_obj.next("li").find("a").attr("title");
			if(prev_title) {
				$(".previous-design-link a").attr("href", prev_href);
				$(".previous-design-link a").attr("title", prev_title);
				$(".previous-design-link a").text(prev_title);
			} else {
				$(".previous-design-link").html("");
			}

			if(next_title) {
				$(".next-design-link a").attr("href", next_href);
				$(".next-design-link a").attr("title", next_title);
				$(".next-design-link a").text(next_title);
			} else {
				$(".next-design-link").html("");
			}
		}
	});

	$("#leftcolumn").html(left_list);
});
	</script>
	<div class="sidebar-box cate-list">
	<div class="sidebar-box recommend-here list-link">
	<a href="javascript:void(0);">Android 基础入门教程</a>	</div>
	
	<ul class="membership">
		
	<li><a target="_top" data-id="12252" title="1.0 Android基础入门教程" href="../w3cnote/android-tutorial-intro.html" >1.0 Android基础入门教程</a></li>
	
		
	<li><a target="_top" data-id="14860" title="1.0.1 2015年最新Android基础入门教程目录" href="../w3cnote/android-tutorial-contents.html" >1.0.1 2015年最新Android基础入门教程目录</a></li>
	
		
	<li><a target="_top" data-id="12255" title="1.1 背景相关与系统架构分析" href="../w3cnote/android-tutorial-system-architecture-analysis.html" >1.1 背景相关与系统架构分析</a></li>
	
		
	<li><a target="_top" data-id="12259" title="1.2 开发环境搭建" href="../w3cnote/android-tutorial-development-environment-build.html" >1.2 开发环境搭建</a></li>
	
		
	<li><a target="_top" data-id="12270" title="1.2.1 使用Eclipse + ADT + SDK开发Android APP" href="../w3cnote/android-tutorial-eclipse-adt-sdk-app.html" >1.2.1 使用Eclipse + ADT + SDK开发Android APP</a></li>
	
		
	<li><a target="_top" data-id="12280" title="1.2.2 使用Android Studio开发Android APP" href="../w3cnote/android-tutorial-android-studio.html" >1.2.2 使用Android Studio开发Android APP</a></li>
	
		
	<li><a target="_top" data-id="12293" title="1.3 SDK更新不了问题解决" href="../w3cnote/android-tutorial-sdk-problem-solve.html" >1.3 SDK更新不了问题解决</a></li>
	
		
	<li><a target="_top" data-id="12329" title="1.4 Genymotion模拟器安装" href="../w3cnote/android-tutorial-genymotion-install.html" >1.4 Genymotion模拟器安装</a></li>
	
		
	<li><a target="_top" data-id="12331" title="1.5.1 Git使用教程之本地仓库的基本操作" href="../w3cnote/android-tutorial-git-repo-operate.html" >1.5.1 Git使用教程之本地仓库的基本操作</a></li>
	
		
	<li><a target="_top" data-id="12366" title="1.5.2 Git之使用GitHub搭建远程仓库" href="../w3cnote/android-tutorial-git-repo-create.html" >1.5.2 Git之使用GitHub搭建远程仓库</a></li>
	
		
	<li><a target="_top" data-id="12394" title="1.6  9(九妹)图片怎么玩" href="../w3cnote/android-tutorial-9-image.html" >1.6  9(九妹)图片怎么玩</a></li>
	
		
	<li><a target="_top" data-id="12478" title="1.7 界面原型设计" href="../w3cnote/android-tutorial-interface-design.html" >1.7 界面原型设计</a></li>
	
		
	<li><a target="_top" data-id="12479" title="1.8 工程相关解析(各种文件，资源访问)" href="../w3cnote/android-tutorial-project-src-analysis.html" >1.8 工程相关解析(各种文件，资源访问)</a></li>
	
		
	<li><a target="_top" data-id="12507" title="1.9 Android程序签名打包" href="../w3cnote/android-tutorial-sign-package.html" >1.9 Android程序签名打包</a></li>
	
		
	<li><a target="_top" data-id="12523" title="1.11 反编译APK获取代码&资源" href="../w3cnote/android-tutorial-decompile-apk-get-code-resources.html" >1.11 反编译APK获取代码&资源</a></li>
	
		
	<li><a target="_top" data-id="12539" title="2.1 View与ViewGroup的概念" href="../w3cnote/android-tutorial-view-viewgroup-intro.html" >2.1 View与ViewGroup的概念</a></li>
	
		
	<li><a target="_top" data-id="12555" title="2.2.1 LinearLayout(线性布局)" href="../w3cnote/android-tutorial-linearlayout.html" >2.2.1 LinearLayout(线性布局)</a></li>
	
		
	<li><a target="_top" data-id="12569" title="2.2.2 RelativeLayout(相对布局)" href="../w3cnote/android-tutorial-relativelayout.html" >2.2.2 RelativeLayout(相对布局)</a></li>
	
		
	<li><a target="_top" data-id="12577" title="2.2.3 TableLayout(表格布局)" href="../w3cnote/android-tutorial-tablelayout.html" >2.2.3 TableLayout(表格布局)</a></li>
	
		
	<li><a target="_top" data-id="12582" title="2.2.4 FrameLayout(帧布局)" href="../w3cnote/android-tutorial-framelayout.html" >2.2.4 FrameLayout(帧布局)</a></li>
	
		
	<li><a target="_top" data-id="12587" title="2.2.5 GridLayout(网格布局)" href="../w3cnote/android-tutorial-gridlayout.html" >2.2.5 GridLayout(网格布局)</a></li>
	
		
	<li><a target="_top" data-id="12591" title="2.2.6 AbsoluteLayout(绝对布局)" href="../w3cnote/android-tutorial-absolutelayout.html" >2.2.6 AbsoluteLayout(绝对布局)</a></li>
	
		
	<li><a target="_top" data-id="12624" title="2.3.1 TextView(文本框)详解" href="../w3cnote/android-tutorial-textview.html" >2.3.1 TextView(文本框)详解</a></li>
	
		
	<li><a target="_top" data-id="12701" title="2.3.2 EditText(输入框)详解" href="../w3cnote/android-tutorial-edittext.html" >2.3.2 EditText(输入框)详解</a></li>
	
		
	<li><a target="_top" data-id="12745" title="2.3.3 Button(按钮)与ImageButton(图像按钮)" href="../w3cnote/android-tutorial-button-imagebutton.html" >2.3.3 Button(按钮)与ImageButton(图像按钮)</a></li>
	
		
	<li><a target="_top" data-id="12770" title="2.3.4 ImageView(图像视图)" href="../w3cnote/android-tutorial-imageview.html" >2.3.4 ImageView(图像视图)</a></li>
	
		
	<li><a target="_top" data-id="12790" title="2.3.5.RadioButton(单选按钮)&Checkbox(复选框)" href="../w3cnote/android-tutorial-radiobutton-checkbox.html" >2.3.5.RadioButton(单选按钮)&Checkbox(复选框)</a></li>
	
		
	<li><a target="_top" data-id="12829" title="2.3.6 开关按钮ToggleButton和开关Switch" href="../w3cnote/android-tutorial-togglebutton-switch.html" >2.3.6 开关按钮ToggleButton和开关Switch</a></li>
	
		
	<li><a target="_top" data-id="13133" title="2.3.7 ProgressBar(进度条)" href="../w3cnote/android-tutorial-progressbar.html" >2.3.7 ProgressBar(进度条)</a></li>
	
		
	<li><a target="_top" data-id="13258" title="2.3.8 SeekBar(拖动条)" href="../w3cnote/android-tutorial-seekbar.html" >2.3.8 SeekBar(拖动条)</a></li>
	
		
	<li><a target="_top" data-id="13267" title="2.3.9 RatingBar(星级评分条)" href="../w3cnote/android-tutorial-ratingbar.html" >2.3.9 RatingBar(星级评分条)</a></li>
	
		
	<li><a target="_top" data-id="13293" title="2.4.1 ScrollView(滚动条)" href="../w3cnote/android-tutorial-scrollview.html" >2.4.1 ScrollView(滚动条)</a></li>
	
		
	<li><a target="_top" data-id="13357" title="2.4.2 Date & Time组件(上)" href="../w3cnote/android-tutorial-date-time-1.html" >2.4.2 Date & Time组件(上)</a></li>
	
		
	<li><a target="_top" data-id="13364" title="2.4.3 Date & Time组件(下)" href="../w3cnote/android-tutorial-date-time-2.html" >2.4.3 Date & Time组件(下)</a></li>
	
		
	<li><a target="_top" data-id="13477" title="2.4.4 Adapter基础讲解" href="../w3cnote/android-tutorial-adapter.html" >2.4.4 Adapter基础讲解</a></li>
	
		
	<li><a target="_top" data-id="13784" title="2.4.5 ListView简单实用" href="../w3cnote/android-tutorial-listview.html" >2.4.5 ListView简单实用</a></li>
	
		
	<li><a target="_top" data-id="13807" title="2.4.6 BaseAdapter优化" href="../w3cnote/android-tutorial-baseadapter.html" >2.4.6 BaseAdapter优化</a></li>
	
		
	<li><a target="_top" data-id="13808" title="2.4.7ListView的焦点问题" href="../w3cnote/android-tutorial-listview-focus.html" >2.4.7ListView的焦点问题</a></li>
	
		
	<li><a target="_top" data-id="13809" title="2.4.8 ListView之checkbox错位问题解决" href="../w3cnote/android-tutorial-listview-checkbox.html" >2.4.8 ListView之checkbox错位问题解决</a></li>
	
		
	<li><a target="_top" data-id="13812" title="2.4.9 ListView的数据更新问题" href="../w3cnote/android-tutorial-listview-update.html" >2.4.9 ListView的数据更新问题</a></li>
	
		
	<li><a target="_top" data-id="13823" title="2.5.0 构建一个可复用的自定义BaseAdapter" href="../w3cnote/android-tutorial-customer-baseadapter.html" >2.5.0 构建一个可复用的自定义BaseAdapter</a></li>
	
		
	<li><a target="_top" data-id="13839" title="2.5.1 ListView Item多布局的实现" href="../w3cnote/android-tutorial-listview-item.html" >2.5.1 ListView Item多布局的实现</a></li>
	
		
	<li><a target="_top" data-id="13885" title="2.5.2 GridView(网格视图)的基本使用" href="../w3cnote/android-tutorial-gridview.html" >2.5.2 GridView(网格视图)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13897" title="2.5.3 Spinner(列表选项框)的基本使用" href="../w3cnote/android-tutorial-spinner.html" >2.5.3 Spinner(列表选项框)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13900" title="2.5.4 AutoCompleteTextView(自动完成文本框)的基本使用" href="../w3cnote/android-tutorial-autocompletetextview.html" >2.5.4 AutoCompleteTextView(自动完成文本框)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13933" title="2.5.5 ExpandableListView(可折叠列表)的基本使用" href="../w3cnote/android-tutorial-expandablelistview.html" >2.5.5 ExpandableListView(可折叠列表)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13936" title="2.5.6 ViewFlipper(翻转视图)的基本使用" href="../w3cnote/android-tutorial-viewflipper.html" >2.5.6 ViewFlipper(翻转视图)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13952" title="2.5.7 Toast(吐司)的基本使用" href="../w3cnote/android-tutorial-toast.html" >2.5.7 Toast(吐司)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13957" title="2.5.8 Notification(状态栏通知)详解" href="../w3cnote/android-tutorial-notification.html" >2.5.8 Notification(状态栏通知)详解</a></li>
	
		
	<li><a target="_top" data-id="13963" title="2.5.9 AlertDialog(对话框)详解" href="../w3cnote/android-tutorial-alertdialog.html" >2.5.9 AlertDialog(对话框)详解</a></li>
	
		
	<li><a target="_top" data-id="13981" title="2.6.0 其他几种常用对话框基本使用" href="../w3cnote/android-tutorial-dialog.html" >2.6.0 其他几种常用对话框基本使用</a></li>
	
		
	<li><a target="_top" data-id="13984" title="2.6.1 PopupWindow(悬浮框)的基本使用" href="../w3cnote/android-tutorial-popupwindow.html" >2.6.1 PopupWindow(悬浮框)的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13986" title="2.6.2 菜单(Menu)" href="../w3cnote/android-tutorial-menu.html" >2.6.2 菜单(Menu)</a></li>
	
		
	<li><a target="_top" data-id="14001" title="2.6.3 ViewPager的简单使用" href="../w3cnote/android-tutorial-viewpager.html" >2.6.3 ViewPager的简单使用</a></li>
	
		
	<li><a target="_top" data-id="14007" title="2.6.4 DrawerLayout(官方侧滑菜单)的简单使用" href="../w3cnote/android-tutorial-drawerlayout.html" >2.6.4 DrawerLayout(官方侧滑菜单)的简单使用</a></li>
	
		
	<li><a target="_top" data-id="12714" title="3.1.1 基于监听的事件处理机制" href="../w3cnote/android-tutorial-listen-event-handle.html" >3.1.1 基于监听的事件处理机制</a></li>
	
		
	<li><a target="_top" data-id="12721" title="3.2 基于回调的事件处理机制" href="../w3cnote/android-tutorial-callback-event-handle.html" >3.2 基于回调的事件处理机制</a></li>
	
		
	<li><a target="_top" data-id="12715" title="3.3 Handler消息传递机制浅析" href="../w3cnote/android-tutorial-handler-message.html" >3.3 Handler消息传递机制浅析</a></li>
	
		
	<li><a target="_top" data-id="12730" title="3.4 TouchListener PK OnTouchEvent + 多点触碰" href="../w3cnote/android-tutorial-touchlistener-ontouchevent.html" >3.4 TouchListener PK OnTouchEvent + 多点触碰</a></li>
	
		
	<li><a target="_top" data-id="12749" title="3.5 监听EditText的内容变化" href="../w3cnote/android-tutorial-listener-edittext-change.html" >3.5 监听EditText的内容变化</a></li>
	
		
	<li><a target="_top" data-id="12752" title="3.6 响应系统设置的事件(Configuration类)" href="../w3cnote/android-tutorial-configuration.html" >3.6 响应系统设置的事件(Configuration类)</a></li>
	
		
	<li><a target="_top" data-id="12807" title="3.7 AsyncTask异步任务" href="../w3cnote/android-tutorial-ansynctask.html" >3.7 AsyncTask异步任务</a></li>
	
		
	<li><a target="_top" data-id="12915" title="3.8 Gestures(手势)" href="../w3cnote/android-tutorial-gestures.html" >3.8 Gestures(手势)</a></li>
	
		
	<li><a target="_top" data-id="13148" title="4.1.1 Activity初学乍练" href="../w3cnote/android-tutorial-activity.html" >4.1.1 Activity初学乍练</a></li>
	
		
	<li><a target="_top" data-id="13160" title="4.1.2 Activity初窥门径" href="../w3cnote/android-tutorial-activity-start.html" >4.1.2 Activity初窥门径</a></li>
	
		
	<li><a target="_top" data-id="13168" title="4.1.3 Activity登堂入室" href="../w3cnote/android-tutorial-activity-intro.html" >4.1.3 Activity登堂入室</a></li>
	
		
	<li><a target="_top" data-id="13198" title="4.2.1 Service初涉" href="../w3cnote/android-tutorial-service-1.html" >4.2.1 Service初涉</a></li>
	
		
	<li><a target="_top" data-id="13212" title="4.2.2 Service进阶" href="../w3cnote/android-tutorial-service-2.html" >4.2.2 Service进阶</a></li>
	
		
	<li><a target="_top" data-id="13237" title="4.2.3 Service精通" href="../w3cnote/android-tutorial-service-3.html" >4.2.3 Service精通</a></li>
	
		
	<li><a target="_top" data-id="13273" title="4.3.1 BroadcastReceiver牛刀小试" href="../w3cnote/android-tutorial-broadcastreceiver.html" >4.3.1 BroadcastReceiver牛刀小试</a></li>
	
		
	<li><a target="_top" data-id="13284" title="4.3.2 BroadcastReceiver庖丁解牛" href="../w3cnote/android-tutorial-broadcastreceiver-2.html" >4.3.2 BroadcastReceiver庖丁解牛</a></li>
	
		
	<li><a target="_top" data-id="13297" title="4.4.1 ContentProvider初探" href="../w3cnote/android-tutorial-contentprovider.html" >4.4.1 ContentProvider初探</a></li>
	
		
	<li><a target="_top" data-id="13319" title="4.4.2 ContentProvider再探——Document Provider" href="../w3cnote/android-tutorial-contentprovider-2.html" >4.4.2 ContentProvider再探——Document Provider</a></li>
	
		
	<li><a target="_top" data-id="13329" title="4.5.1 Intent的基本使用" href="../w3cnote/android-tutorial-intent-base.html" >4.5.1 Intent的基本使用</a></li>
	
		
	<li><a target="_top" data-id="13346" title="4.5.2 Intent之复杂数据的传递" href="../w3cnote/android-tutorial-intent-pass-data.html" >4.5.2 Intent之复杂数据的传递</a></li>
	
		
	<li><a target="_top" data-id="13401" title="5.1 Fragment基本概述" href="../w3cnote/android-tutorial-fragment-base.html" >5.1 Fragment基本概述</a></li>
	
		
	<li><a target="_top" data-id="13431" title="5.2.1 Fragment实例精讲——底部导航栏的实现(方法1)" href="../w3cnote/android-tutorial-fragment-demo1.html" >5.2.1 Fragment实例精讲——底部导航栏的实现(方法1)</a></li>
	
		
	<li><a target="_top" data-id="13432" title="5.2.2 Fragment实例精讲——底部导航栏的实现(方法2)" href="../w3cnote/android-tutorial-fragment-demo2.html" >5.2.2 Fragment实例精讲——底部导航栏的实现(方法2)</a></li>
	
		
	<li><a target="_top" data-id="13439" title="5.2.3 Fragment实例精讲——底部导航栏的实现(方法3)" href="../w3cnote/android-tutorial-fragment-demo3.html" >5.2.3 Fragment实例精讲——底部导航栏的实现(方法3)</a></li>
	
		
	<li><a target="_top" data-id="13448" title="5.2.4 Fragment实例精讲——底部导航栏+ViewPager滑动切换页面" href="../w3cnote/android-tutorial-fragment-demo4.html" >5.2.4 Fragment实例精讲——底部导航栏+ViewPager滑动切换页面</a></li>
	
		
	<li><a target="_top" data-id="13597" title="5.2.5 Fragment实例精讲——新闻(购物)类App列表Fragment的简单实现" href="../w3cnote/android-tutorial-fragment-demo5.html" >5.2.5 Fragment实例精讲——新闻(购物)类App列表Fragment的简单实现</a></li>
	
		
	<li><a target="_top" data-id="13478" title="6.1 数据存储与访问之——文件存储读写" href="../w3cnote/android-tutorial-file.html" >6.1 数据存储与访问之——文件存储读写</a></li>
	
		
	<li><a target="_top" data-id="13523" title="6.2 数据存储与访问之——SharedPreferences保存用户偏好参数" href="../w3cnote/android-tutorial-sharedpreferences.html" >6.2 数据存储与访问之——SharedPreferences保存用户偏好参数</a></li>
	
		
	<li><a target="_top" data-id="13574" title="6.3.1 数据存储与访问之——初见SQLite数据库" href="../w3cnote/android-tutorial-sqlite-intro.html" >6.3.1 数据存储与访问之——初见SQLite数据库</a></li>
	
		
	<li><a target="_top" data-id="13590" title="6.3.2 数据存储与访问之——又见SQLite数据库" href="../w3cnote/android-tutorial-sqlite-2.html" >6.3.2 数据存储与访问之——又见SQLite数据库</a></li>
	
		
	<li><a target="_top" data-id="13601" title="7.1.1 Android网络编程要学的东西与Http协议学习" href="../w3cnote/android-tutorial-http.html" >7.1.1 Android网络编程要学的东西与Http协议学习</a></li>
	
		<li>
	7.1.2 Android Http请求头与响应头的学习	</li>
	
		
	<li><a target="_top" data-id="13620" title="7.1.3 Android HTTP请求方式:HttpURLConnection" href="../w3cnote/android-tutorial-httpurlconnection.html" >7.1.3 Android HTTP请求方式:HttpURLConnection</a></li>
	
		
	<li><a target="_top" data-id="13631" title="7.1.4 Android HTTP请求方式:HttpClient" href="../w3cnote/android-tutorial-httpclient.html" >7.1.4 Android HTTP请求方式:HttpClient</a></li>
	
		
	<li><a target="_top" data-id="13633" title="7.2.1 Android XML数据解析" href="../w3cnote/android-tutorial-xml.html" >7.2.1 Android XML数据解析</a></li>
	
		
	<li><a target="_top" data-id="13681" title="7.2.2 Android JSON数据解析" href="../w3cnote/android-tutorial-json.html" >7.2.2 Android JSON数据解析</a></li>
	
		
	<li><a target="_top" data-id="13685" title="7.3.1 Android 文件上传" href="../w3cnote/android-tutorial-upload-file.html" >7.3.1 Android 文件上传</a></li>
	
		
	<li><a target="_top" data-id="13688" title="7.3.2 Android 文件下载（1）" href="../w3cnote/android-tutorial-download1.html" >7.3.2 Android 文件下载（1）</a></li>
	
		
	<li><a target="_top" data-id="13697" title="7.3.3 Android 文件下载（2）" href="../w3cnote/android-tutorial-download2.html" >7.3.3 Android 文件下载（2）</a></li>
	
		
	<li><a target="_top" data-id="13706" title="7.4 Android 调用 WebService" href="../w3cnote/android-tutorial-webservice.html" >7.4 Android 调用 WebService</a></li>
	
		
	<li><a target="_top" data-id="13724" title="7.5.1 WebView(网页视图)基本用法" href="../w3cnote/android-tutorial-webview.html" >7.5.1 WebView(网页视图)基本用法</a></li>
	
		
	<li><a target="_top" data-id="13731" title="7.5.2 WebView和JavaScrip交互基础" href="../w3cnote/android-tutorial-webview-javascrip.html" >7.5.2 WebView和JavaScrip交互基础</a></li>
	
		
	<li><a target="_top" data-id="13738" title="7.5.3 Android 4.4后WebView的一些注意事项" href="../w3cnote/android-tutorial-webview-attention.html" >7.5.3 Android 4.4后WebView的一些注意事项</a></li>
	
		
	<li><a target="_top" data-id="13748" title="7.5.4 WebView文件下载" href="../w3cnote/android-tutorial-webview-download-file.html" >7.5.4 WebView文件下载</a></li>
	
		
	<li><a target="_top" data-id="13751" title="7.5.5 WebView缓存问题" href="../w3cnote/android-tutorial-webview-cache.html" >7.5.5 WebView缓存问题</a></li>
	
		
	<li><a target="_top" data-id="13756" title="7.5.6 WebView处理网页返回的错误码信息" href="../w3cnote/android-tutorial-webview-error-code.html" >7.5.6 WebView处理网页返回的错误码信息</a></li>
	
		
	<li><a target="_top" data-id="13760" title="7.6.1 Socket学习网络基础准备" href="../w3cnote/android-tutorial-socket-intro.html" >7.6.1 Socket学习网络基础准备</a></li>
	
		
	<li><a target="_top" data-id="13768" title="7.6.2 基于TCP协议的Socket通信(1)" href="../w3cnote/android-tutorial-socket1.html" >7.6.2 基于TCP协议的Socket通信(1)</a></li>
	
		
	<li><a target="_top" data-id="13775" title="7.6.3 基于TCP协议的Socket通信(2)" href="../w3cnote/android-tutorial-socket2.html" >7.6.3 基于TCP协议的Socket通信(2)</a></li>
	
		
	<li><a target="_top" data-id="13788" title="7.6.4 基于UDP协议的Socket通信" href="../w3cnote/android-tutorial-udp-socket.html" >7.6.4 基于UDP协议的Socket通信</a></li>
	
		
	<li><a target="_top" data-id="14013" title="8.1.1 Android中的13种Drawable小结 Part 1" href="../w3cnote/android-tutorial-drawable1.html" >8.1.1 Android中的13种Drawable小结 Part 1</a></li>
	
		
	<li><a target="_top" data-id="14018" title="8.1.2 Android中的13种Drawable小结 Part 2" href="../w3cnote/android-tutorial-drawable2.html" >8.1.2 Android中的13种Drawable小结 Part 2</a></li>
	
		
	<li><a target="_top" data-id="14035" title="8.1.3 Android中的13种Drawable小结 Part 3" href="../w3cnote/android-tutorial-drawable3.html" >8.1.3 Android中的13种Drawable小结 Part 3</a></li>
	
		
	<li><a target="_top" data-id="14092" title="8.2.1 Bitmap(位图)全解析 Part 1" href="../w3cnote/android-tutorial-bitmap1.html" >8.2.1 Bitmap(位图)全解析 Part 1</a></li>
	
		
	<li><a target="_top" data-id="14102" title="8.2.2 Bitmap引起的OOM问题" href="../w3cnote/android-tutorial-bitmap2.html" >8.2.2 Bitmap引起的OOM问题</a></li>
	
		
	<li><a target="_top" data-id="14113" title="8.3.1 三个绘图工具类详解" href="../w3cnote/android-tutorial-drawable-tool.html" >8.3.1 三个绘图工具类详解</a></li>
	
		
	<li><a target="_top" data-id="14144" title="8.3.2 绘图类实战示例" href="../w3cnote/android-tutorial-bitmap-demo.html" >8.3.2 绘图类实战示例</a></li>
	
		
	<li><a target="_top" data-id="14301" title="8.3.3 Paint API之—— MaskFilter(面具)" href="../w3cnote/android-tutorial-maskfilter.html" >8.3.3 Paint API之—— MaskFilter(面具)</a></li>
	
		
	<li><a target="_top" data-id="14307" title="8.3.4 Paint API之—— Xfermode与PorterDuff详解(一)" href="../w3cnote/android-tutorial-xfermode-porterduff.html" >8.3.4 Paint API之—— Xfermode与PorterDuff详解(一)</a></li>
	
		
	<li><a target="_top" data-id="14343" title="8.3.5 Paint API之—— Xfermode与PorterDuff详解(二)" href="../w3cnote/android-tutorial-xfermode-porterduff2.html" >8.3.5 Paint API之—— Xfermode与PorterDuff详解(二)</a></li>
	
		
	<li><a target="_top" data-id="14387" title="8.3.6 Paint API之—— Xfermode与PorterDuff详解(三)" href="../w3cnote/android-tutorial-xfermode-porterduff3.html" >8.3.6 Paint API之—— Xfermode与PorterDuff详解(三)</a></li>
	
		
	<li><a target="_top" data-id="14398" title="8.3.7 Paint API之—— Xfermode与PorterDuff详解(四)" href="../w3cnote/android-tutorial-xfermode-porterduff4.html" >8.3.7 Paint API之—— Xfermode与PorterDuff详解(四)</a></li>
	
		
	<li><a target="_top" data-id="14410" title="8.3.8 Paint API之—— Xfermode与PorterDuff详解(五)" href="../w3cnote/android-tutorial-xfermode-porterduff5.html" >8.3.8 Paint API之—— Xfermode与PorterDuff详解(五)</a></li>
	
		
	<li><a target="_top" data-id="14411" title="8.3.9 Paint API之—— ColorFilter(颜色过滤器)(1/3)" href="../w3cnote/android-tutorial-colorfilter1.html" >8.3.9 Paint API之—— ColorFilter(颜色过滤器)(1/3)</a></li>
	
		
	<li><a target="_top" data-id="14427" title="8.3.10 Paint API之—— ColorFilter(颜色过滤器)(2-3)" href="../w3cnote/android-tutorial-colorfilterl2.html" >8.3.10 Paint API之—— ColorFilter(颜色过滤器)(2-3)</a></li>
	
		
	<li><a target="_top" data-id="14430" title="8.3.11 Paint API之—— ColorFilter(颜色过滤器)(3-3)" href="../w3cnote/android-tutorial-colorfilter3.html" >8.3.11 Paint API之—— ColorFilter(颜色过滤器)(3-3)</a></li>
	
		
	<li><a target="_top" data-id="14517" title="8.3.12 Paint API之—— PathEffect(路径效果)" href="../w3cnote/android-tutorial-patheffect.html" >8.3.12 Paint API之—— PathEffect(路径效果)</a></li>
	
		
	<li><a target="_top" data-id="14520" title="8.3.13 Paint API之—— Shader(图像渲染)" href="../w3cnote/android-tutorial-shader.html" >8.3.13 Paint API之—— Shader(图像渲染)</a></li>
	
		
	<li><a target="_top" data-id="14523" title="8.3.14 Paint几个枚举/常量值以及ShadowLayer阴影效果" href="../w3cnote/android-tutorial-shadowlayer.html" >8.3.14 Paint几个枚举/常量值以及ShadowLayer阴影效果</a></li>
	
		
	<li><a target="_top" data-id="14538" title="8.3.15 Paint API之——Typeface(字型)" href="../w3cnote/android-tutorial-typeface.html" >8.3.15 Paint API之——Typeface(字型)</a></li>
	
		
	<li><a target="_top" data-id="14589" title="8.3.16 Canvas API详解(Part 1)" href="../w3cnote/android-tutorial-canvas-api1.html" >8.3.16 Canvas API详解(Part 1)</a></li>
	
		
	<li><a target="_top" data-id="14678" title="8.3.17 Canvas API详解(Part 2)剪切方法合集" href="../w3cnote/android-tutorial-canvas-api2.html" >8.3.17 Canvas API详解(Part 2)剪切方法合集</a></li>
	
		
	<li><a target="_top" data-id="14692" title="8.3.18 Canvas API详解(Part 3)Matrix和drawBitmapMesh" href="../w3cnote/android-tutorial-canvas-api3.html" >8.3.18 Canvas API详解(Part 3)Matrix和drawBitmapMesh</a></li>
	
		
	<li><a target="_top" data-id="14718" title="8.4.1 Android动画合集之帧动画" href="../w3cnote/android-tutorial-animation.html" >8.4.1 Android动画合集之帧动画</a></li>
	
		
	<li><a target="_top" data-id="14722" title="8.4.2 Android动画合集之补间动画" href="../w3cnote/android-tutorial-alphaanimation.html" >8.4.2 Android动画合集之补间动画</a></li>
	
		
	<li><a target="_top" data-id="14730" title="8.4.3 Android动画合集之属性动画-初见" href="../w3cnote/android-tutorial-valueanimator.html" >8.4.3 Android动画合集之属性动画-初见</a></li>
	
		
	<li><a target="_top" data-id="14768" title="8.4.4 Android动画合集之属性动画-又见" href="../w3cnote/android-tutorial-valueanimator2.html" >8.4.4 Android动画合集之属性动画-又见</a></li>
	
		
	<li><a target="_top" data-id="14149" title="9.1 使用SoundPool播放音效(Duang~)" href="../w3cnote/android-tutorial-soundpool.html" >9.1 使用SoundPool播放音效(Duang~)</a></li>
	
		
	<li><a target="_top" data-id="14612" title="9.2 MediaPlayer播放音频与视频" href="../w3cnote/android-tutorial-mediaplayer.html" >9.2 MediaPlayer播放音频与视频</a></li>
	
		
	<li><a target="_top" data-id="14831" title="9.3 使用Camera拍照" href="../w3cnote/android-tutorial-camera.html" >9.3 使用Camera拍照</a></li>
	
		
	<li><a target="_top" data-id="14832" title="9.4 使用MediaRecord录音" href="../w3cnote/android-tutorial-mediarecord.html" >9.4 使用MediaRecord录音</a></li>
	
		
	<li><a target="_top" data-id="14156" title="10.1 TelephonyManager(电话管理器)" href="../w3cnote/android-tutorial-telephonymanager.html" >10.1 TelephonyManager(电话管理器)</a></li>
	
		
	<li><a target="_top" data-id="14163" title="10.2 SmsManager(短信管理器)" href="../w3cnote/android-tutorial-smsmanager.html" >10.2 SmsManager(短信管理器)</a></li>
	
		
	<li><a target="_top" data-id="14166" title="10.3 AudioManager(音频管理器)" href="../w3cnote/android-tutorial-audiomanager.html" >10.3 AudioManager(音频管理器)</a></li>
	
		
	<li><a target="_top" data-id="14319" title="10.4 Vibrator(振动器)" href="../w3cnote/android-tutorial-vibrator.html" >10.4 Vibrator(振动器)</a></li>
	
		
	<li><a target="_top" data-id="14400" title="10.5 AlarmManager(闹钟服务)" href="../w3cnote/android-tutorial-alarmmanager.html" >10.5 AlarmManager(闹钟服务)</a></li>
	
		
	<li><a target="_top" data-id="14438" title="10.6 PowerManager(电源服务)" href="../w3cnote/android-tutorial-powermanager.html" >10.6 PowerManager(电源服务)</a></li>
	
		
	<li><a target="_top" data-id="14697" title="10.7 WindowManager(窗口管理服务)" href="../w3cnote/android-tutorial-windowmanager.html" >10.7 WindowManager(窗口管理服务)</a></li>
	
		
	<li><a target="_top" data-id="14702" title="10.8 LayoutInflater(布局服务)" href="../w3cnote/android-tutorial-layoutinflater.html" >10.8 LayoutInflater(布局服务)</a></li>
	
		
	<li><a target="_top" data-id="14737" title="10.9 WallpaperManager(壁纸管理器)" href="../w3cnote/android-tutorial-wallpapermanager.html" >10.9 WallpaperManager(壁纸管理器)</a></li>
	
		
	<li><a target="_top" data-id="14743" title="10.10 传感器专题(1)——相关介绍" href="../w3cnote/android-tutorial-sensor1.html" >10.10 传感器专题(1)——相关介绍</a></li>
	
		
	<li><a target="_top" data-id="14746" title="10.11 传感器专题(2)——方向传感器" href="../w3cnote/android-tutorial-sensor2.html" >10.11 传感器专题(2)——方向传感器</a></li>
	
		
	<li><a target="_top" data-id="14778" title="10.12 传感器专题(3)——加速度/陀螺仪传感器" href="../w3cnote/android-tutorial-sensor3.html" >10.12 传感器专题(3)——加速度/陀螺仪传感器</a></li>
	
		
	<li><a target="_top" data-id="14835" title="10.12 传感器专题(4)——其他传感器了解" href="../w3cnote/android-tutorial-sensor4.html" >10.12 传感器专题(4)——其他传感器了解</a></li>
	
		
	<li><a target="_top" data-id="14837" title="10.14 Android GPS初涉" href="../w3cnote/android-tutorial-gps.html" >10.14 Android GPS初涉</a></li>
	
		
	<li><a target="_top" data-id="14846" title="11.0《2015最新Android基础入门教程》完结散花~" href="../w3cnote/android-tutorial-end.html" >11.0《2015最新Android基础入门教程》完结散花~</a></li>
	
		
	<li><a target="_top" data-id="19314" title="12.1Android 实战 ：DrySister看妹子应用(第一版) -- 项目搭建与简单实现" href="../w3cnote/android-tutorial-exercise-1.html" >12.1Android 实战 ：DrySister看妹子应用(第一版) -- 项目搭建与简单实现</a></li>
	
		
	<li><a target="_top" data-id="19321" title="12.2 DrySister看妹子应用(第一版)——2.解析后台数据" href="../w3cnote/android-tutorial-exercise-2.html" >12.2 DrySister看妹子应用(第一版)——2.解析后台数据</a></li>
	
		
	<li><a target="_top" data-id="19334" title="12.3 DrySister看妹子应用(第一版)——3.图片加载优化(写个图片缓存小框架)" href="../w3cnote/android-tutorial-exercise-3.html" >12.3 DrySister看妹子应用(第一版)——3.图片加载优化(写个图片缓存小框架)</a></li>
	
		
	<li><a target="_top" data-id="19349" title="12.4 DrySister看妹子应用(第一版)——4.添加数据缓存(加入SQLite)" href="../w3cnote/android-tutorial-exercise-4.html" >12.4 DrySister看妹子应用(第一版)——4.添加数据缓存(加入SQLite)</a></li>
	
		
	<li><a target="_top" data-id="19355" title="12.5 DrySister看妹子应用(第一版)——5.代码回顾，调整与日志类编写" href="../w3cnote/android-tutorial-exercise-5.html" >12.5 DrySister看妹子应用(第一版)——5.代码回顾，调整与日志类编写</a></li>
	
		
	<li><a target="_top" data-id="19386" title="12.6 DrySister看妹子应用(第一版)——6.图标制作，混淆，签名打包，APK瘦身，应用发布" href="../w3cnote/android-tutorial-exercise-6-html.html" >12.6 DrySister看妹子应用(第一版)——6.图标制作，混淆，签名打包，APK瘦身，应用发布</a></li>
	
	</ul></div>	</div>
</div>


<!-- 底部 -->
<div id="footer" class="mar-t50">
   <div class="runoob-block">
    <div class="runoob cf">
     <dl>
      <dt>
       在线实例
      </dt>
      <dd>
       &middot;<a target="_blank" href="../html/html-examples.html">HTML 实例</a>
      </dd>
      <dd>
       &middot;<a target="_blank" href="../css/css-examples.html">CSS 实例</a>
      </dd>
      <dd>
       &middot;<a target="_blank" href="../js/js-examples.html">JavaScript 实例</a>
      </dd>
      <dd>
       &middot;<a target="_blank" href="../ajx/ajax-examples.html">Ajax 实例</a>
      </dd>
       <dd>
       &middot;<a target="_blank" href="../jquery/jquery-examples.html">jQuery 实例</a>
      </dd>
      <dd>
       &middot;<a target="_blank" href="../xml/xml-examples.html">XML 实例</a>
      </dd>
      <dd>
       &middot;<a target="_blank" href="../java/java-examples.html">Java 实例</a>
      </dd>
     
     </dl>
     <dl>
      <dt>
      字符集&工具
      </dt>
      <dd>
       &middot; <a target="_blank" href="../charsets/html-charsets.html">HTML 字符集设置</a>
      </dd>
      <dd>
       &middot; <a target="_blank" href="../tags/html-ascii.html">HTML ASCII 字符集</a>
      </dd>
     <dd>
       &middot; <a target="_blank" href="https://c.runoob.com/front-end/6939/">JS 混淆/加密</a>
      </dd> 
      <dd>
       &middot; <a target="_blank" href="https://c.runoob.com/front-end/6232/">PNG/JPEG 图片压缩</a>
      </dd>
      <dd>
       &middot; <a target="_blank" href="../tags/html-colorpicker.html">HTML 拾色器</a>
      </dd>
      <dd>
       &middot; <a target="_blank" href="..//c.runoob.com/front-end/53">JSON 格式化工具</a>
      </dd>
      <dd>
       &middot; <a target="_blank" href="..//c.runoob.com/front-end/6680/">随机数生成器</a>
      </dd>
     </dl>
     <dl>
      <dt>
       最新更新
      </dt>
                   <dd>
       &middot;
      <a href="../matplotlib/matplotlib-imread.html" title="Matplotlib imread() 方法">Matplotlib imre...</a>
      </dd>
              <dd>
       &middot;
      <a href="../matplotlib/matplotlib-imsave.html" title="Matplotlib imsave() 方法">Matplotlib imsa...</a>
      </dd>
              <dd>
       &middot;
      <a href="../matplotlib/matplotlib-imshow.html" title="Matplotlib imshow() 方法">Matplotlib imsh...</a>
      </dd>
              <dd>
       &middot;
      <a href="../matplotlib/matplotlib-hist.html" title="Matplotlib 直方图">Matplotlib 直方图</a>
      </dd>
              <dd>
       &middot;
      <a href="../python3/python-func-object.html" title="Python object() 函数">Python object()...</a>
      </dd>
              <dd>
       &middot;
      <a href="../python3/python-ai-draw.html" title="Python AI 绘画">Python AI 绘画</a>
      </dd>
              <dd>
       &middot;
      <a href="../w3cnote/cursor-editor.html" title="神辅助 Cursor 编辑器，加入 GPT-4 让编码更轻松！">神辅助 Cursor ...</a>
      </dd>
             </dl>
     <dl>
      <dt>
       站点信息
      </dt>
      <dd>
       &middot;
       <a target="_blank" href="mailto:admin@runoob.com" rel="external nofollow">意见反馈</a>
       </dd>
      <dd>
       &middot;
      <a target="_blank" href="../disclaimer">免责声明</a>
       </dd>
      <dd>
       &middot;
       <a target="_blank" href="../aboutus">关于我们</a>
       </dd>
      <dd>
       &middot;
      <a target="_blank" href="../archives">文章归档</a>
      </dd>
    
     </dl>
    
     <div class="search-share">
      <div class="app-download">
        <div>
         <strong>关注微信</strong>
        </div>
      </div>
      <div class="share">
      <img width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png" />
       </div>
     </div>
     
    </div>
   </div>
   <div class="w-1000 copyright">
     Copyright &copy; 2013-2023    <strong><a href="../" target="_blank">菜鸟教程</a></strong>&nbsp;
    <strong><a href="../" target="_blank">runoob.com</a></strong> All Rights Reserved. 备案号：<a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn/">闽ICP备15012807号-1</a>
   </div>
  </div>
  <div class="fixed-btn">
    <a class="go-top" href="javascript:void(0)" title="返回顶部"> <i class="fa fa-angle-up"></i></a>
    <a class="qrcode"  href="javascript:void(0)" title="关注我们"><i class="fa fa-qrcode"></i></a>
    <a class="writer" style="display:none" href="javascript:void(0)"   title="标记/收藏"><i class="fa fa-star" aria-hidden="true"></i></a>
    <!-- qrcode modal -->
    <div id="bottom-qrcode" class="modal panel-modal hide fade in">
      <h4>微信关注</h4>
      <div class="panel-body"><img alt="微信关注" width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png"></div> 
    </div>
  </div>

 <div style="display:none;">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-84264393-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-84264393-2');
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?3eec0b7da6548cf07db3bc477ea905ee";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</div>
<script>
window.jsui={
    www: 'https://www.runoob.com',
    uri: 'https://www.runoob.com/wp-content/themes/runoob'
};
</script>

<script src=""></script>
<script src=""></script>

</body>
</html>